home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_11
/
2n11066a
< prev
next >
Wrap
Text File
|
1991-09-07
|
473b
|
26 lines
/*
* Check for NetWare connection
* (written for Borland C)
*/
#include <stdio.h>
#include <dos.h>
struct REGPACK r; /* make 80x86 registers available */
int main(void)
{
r.r_ax = 0xDC00;
intr(0x21,&r); /* Get connection number */
if ((r.r_ax & 0x00FF) > 0)
printf("You have NetWare connection #%d.\n",(r.r_ax & 0x00FF));
else
{
puts("You're not logged in to a NetWare LAN.");
return(1);
}
return(0);
}